package com.lagou.zxy.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.ToString;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;

import javax.persistence.*;
import java.util.Date;

/**
 * @program: stage-4-module-2
 * @description:
 * @author: zhangxiaoyang
 * @date: 2020-11-02 22:51
 **/
@Table(name = "c_order")
@Data
@Entity
@ToString
public class Order {

    @Id
    @Column(name = "id")
    private Long id;

    @Column(name = "is_del", nullable = false, columnDefinition = "bit default 0")
    private boolean del;

    @Column
    private Integer userId;

    @Column
    private Integer companyId;

    @Column
    private Integer publishUserId;

    @Column
    private Integer positionId;

    @Column
    private Integer resumeType;

    @Column
    private String status;

    @CreatedDate
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createTime;

    @LastModifiedDate
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateTime;

}
